#include <stdio.h>

void hanoi(int n,char A,char B,char C){
	if(n <= 0) return;//退出条件
	if(n == 1){
		printf("移动第%d从%c挪动到%c \n",n,A,C);
	}else{
		hanoi(n-1,A,C,B);
		printf("移动第%d从%c挪动到%c \n",n,A,C);
		hanoi(n-1,B,A,C);
	}
}
int main(){
	char A,B,C;
	int x;
	printf("请输入盘子数：\n");
	scanf("%d",&x);
	hanoi(x,'A','B','C');
}
